package com.etc.dao;

import com.etc.pojo.Comment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentOfDao {

    /**
     * 插入评论
     * @param comment
     * @return
     */
    public int insertComment(Comment comment);


    /**
     * 插入评论回复
     * @param comment
     * @return
     */
    public int insertReplyComment(Comment comment);

    /**
     * 删除评论
     * @param commentId
     * @return
     */
    public int deleteCommentByCommentId(int commentId);



    /**
     * 更新评论回复状态
     * @param commentId
     * @param replyId
     * @return
     */
    public int updateCommentReply(@Param("commentId") int commentId, @Param("replyId") int replyId);

    /**
     * 根据视频编号查询评论
     * @param videoId
     * @return
     */
    public List<Comment> queryCommentByVideoId(int videoId);

    /**
     * 根据评论编号查询评论
     * @param commentId
     * @return
     */
    public Comment queryCommentById(int commentId);



}
